<?

$fs_inv_ctl_purchase_orders = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"inv_ctl_purchase_orders",
	title=>"Inventory Purchase Orders",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["purchase_order_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"supplier_id",label=>"Supplier",type=>"any",
				input=>"hidden"),
		array (name=>"po_number",label=>"PO Number",type=>"alphanumeric",
				input=>"field"),
		array (name=>"description",label=>"Description",type=>"alphanumeric",
				input=>"text"),
		array (name=>"order_date",label=>"Order Date",type=>"any",
				input=>"date",value=>_app_date("order_date")),
		array (name=>"date_required",label=>"Date Required",type=>"any",
				input=>"date",value=>_app_date("date_required")),
		array (name=>"date_promised",label=>"Date Promised",type=>"any",
				input=>"date",value=>_app_date("date_promised")),
		array (name=>"ship_date",label=>"Shipment Date",type=>"any",
				input=>"date",value=>_app_date("ship_date")),
		array (name=>"shipping_method_id",label=>"Shipping Method ID",type=>"numeric",
				relation=>array(foreign=>"inv_ctl_shipping_methods",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM inv_ctl_shipping_methods",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"freight_charge",label=>"Feight Charge",type=>"decimal",
				input=>"field"),
	),
));

$fs_inv_ctl_purchase_orders->parse ();

?>
